using System;
using System.Collections.Generic;
using System.Text;

namespace WOWEquipOptimizer
{
    /// <summary>
    /// pretty much self explaining, base functions for the specific character metaclass
    /// </summary>
    abstract class Healer : Character
    {
        public Healer()
            : base()
        {
            Buff bow = new Buff("Blessing of Wisdom", new List<Attribute>());
            bow.Attributes.Add(new Attribute(AttributeName.MP5, 41 * 1.2f));
            Buffs.Add(bow);
            Buff mightyresto = new Buff("Flask of Mighty Restoration", new List<Attribute>());
            mightyresto.Attributes.Add(new Attribute(AttributeName.MP5, 25));
            Buffs.Add(mightyresto);
            Buff manapotions = new Buff("Superior Mana Potions", new List<Attribute>());
            manapotions.Attributes.Add(new Attribute(AttributeName.MP5, 2400 / 24));
            Buffs.Add(manapotions);
            Buff sporefish = new Buff("Blackened Sporefish", new List<Attribute>());
            sporefish.Attributes.Add(new Attribute(AttributeName.MP5, 8));
            sporefish.Attributes.Add(new Attribute(AttributeName.Stamina, 20));
            Buffs.Add(sporefish);
            Buff airwrath = new Buff("Wrath of Air Totem", new List<Attribute>());
            airwrath.Attributes.Add(new Attribute(AttributeName.SpellDamage, 103));
            Buffs.Add(airwrath);
            Buff mstream = new Buff("Manastream Totem", new List<Attribute>());
            mstream.Attributes.Add(new Attribute(AttributeName.MP5, 12 * 2.5f));
            Buffs.Add(mstream);
            Buff supoil = new Buff("Superior Mana Oil", new List<Attribute>());
            supoil.Attributes.Add(new Attribute(AttributeName.MP5, 14));
            Buffs.Add(supoil);
            GoodAttributes.Remove(AttributeName.CritSpellRating);
            GoodAttributes.Remove(AttributeName.SpellDamage);
        }
        public override List<Item> filterEquip(List<Item> input)
        {
            input = base.filterEquip(input);
            List<Item> retval = new List<Item>();
            foreach (Item item in input)
            {
                bool bad = false;
                foreach (Attribute attr in item.Attributes)
                {
                    switch (attr.Type)
                    {
                        case AttributeName.CritRating:
                        case AttributeName.CritMeleeRating:
                        case AttributeName.HasteRating:
                        case AttributeName.HitRating:
                        case AttributeName.HitMeleeRating:
                        case AttributeName.RangedAttackPower:
                        case AttributeName.AttackPower:
                            {
                                bad = true;
                                break;
                            }
                        default:
                            break;
                    }
                }
                if (!bad)
                {
                    retval.Add(item);
                }
            }
            return retval;
        }
        // mana, int, spirit, +heal, crit, spellhaste, mp5
        public override string[] getAttributes()
        {
            return new string[] { "Mana", "Intellect", "Spirit", "Healing", "CritSpellRating", "HasteSpellRating", "MP5", "Health" };
        }
        public override string targetValue()
        {
            return "HPS";
        }
    }
}
